From bb53f893e25cbff9832e2ab6632ed5e306610e2b Mon Sep 17 00:00:00 2001 From: Christian Hergert Date: Sat, 14 Feb 2015 18:11:54 -0800 Subject: [PATCH] stack: check for widget before calling is_ancestor() We can hit this path during the destruction case, where widget has been released. This fixes a lot of superfluous error messages on console. --- gtk/gtkstack.c | 1 + 1 file changed, 1 insertion(+) diff --git a/gtk/gtkstack.c b/gtk/gtkstack.c index 2125d66b69..652b856293 100644 --- a/gtk/gtkstack.c +++ b/gtk/gtkstack.c @@ -1023,6 +1023,7 @@ set_visible_child (GtkStack *stack, focus = gtk_window_get_focus (GTK_WINDOW (toplevel)); if (focus && priv->visible_child && + priv->visible_child->widget && gtk_widget_is_ancestor (focus, priv->visible_child->widget)) { contains_focus = TRUE; -- 2.30.2